home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / sd-26.zip / Makefile < prev    next >
Makefile  |  1992-09-09  |  3KB  |  98 lines

  1. # sample Makefile for Sd (square dance caller's helper)
  2.  
  3. # If your X system was compiled with an ANSI C compiler,
  4. # you should run "xmkmf", which will use the Imakefile and your
  5. # local X configuration information to generate a Makefile.
  6. # This sample Makefile will be moved to Makefile.bak.
  7.  
  8. # If you must use this file directly, expect to have to edit it.
  9.  
  10. CC=gcc
  11. CFLAGS=$(FLAGS) -traditional
  12. # Note: the "-traditional" above is needed only if "fixincludes" has
  13. # not been run on your machine.
  14.  
  15. # FLAGS is used by both cc and ld.
  16. # If you want a smaller executable and are willing to lose the ability
  17. # to debug, use "-O" instead of "-g".
  18. FLAGS = -O
  19.  
  20. # these flags are passed only to ld
  21. LDFLAGS = $(FLAGS)
  22.  
  23. # additional flags for gildea's code
  24. UICFLAGS = -Wswitch
  25.  
  26. #PEDCFLAGS = -pedantic -O -Wimplicit -Wreturn-type -Wunused -Wcomment
  27. #PEDANTICW = -Wformat -Wchar-subscripts -Wshadow -Wpointer-arith
  28. #PEDCFLAGS2 = $(PEDCFLAGS) $(PEDANTICW) -Wmissing-prototypes -Wnested-externs
  29. # for HP Snake: +w1 -z
  30.  
  31. SDUI_OBJ = sdui-x11.o
  32. SDUI_SRC = sdui-x11.c
  33.  
  34. # Libraries the UI needs to be linked with.  If your X11 libraries aren't
  35. # installed, you may want to add some -L<dir> flags to LDFLAGS below
  36. # to specify the library directories explicitly.
  37. SDUI_LIBS = -lXaw -lXmu -lXt -lXext -lX11
  38.  
  39. # override unnecessary SunOS 4.0 stuff:
  40. #TARGET_ARCH=
  41.  
  42. SD_OBJS = sdmain.o sdinit.o sdutil.o sdbasic.o sdtables.o \
  43.           sdtop.o sd.o sdpreds.o sd12.o sd16.o \
  44.           sdgetout.o sdmoves.o sdtand.o sdconc.o sdistort.o \
  45.           sdsi.o
  46.  
  47. SD_SRCS = sdmain.c sdinit.c sdutil.c sdbasic.c sdtables.c \
  48.           sdtop.c sd.c sdpreds.c sd12.c sd16.c \
  49.           sdgetout.c sdmoves.c sdtand.c sdconc.c sdistort.c \
  50.           sdsi.c
  51.  
  52. all: sd mkcalls sd_calls.dat
  53.  
  54. sd: $(SD_OBJS) $(SDUI_OBJ)
  55.     $(CC) $(LDFLAGS) -o $@ $(SD_OBJS) $(SDUI_OBJ) $(SDUI_LIBS)
  56.  
  57. mkcalls: mkcalls.o
  58.     $(CC) $(LDFLAGS) -o $@ mkcalls.o
  59.  
  60. sd_calls.dat: sd_calls.txt mkcalls
  61.     ./mkcalls
  62.  
  63. # TeX outputs front, body, toc; we want front, toc, body
  64.  
  65. sd_doc-sorted.dvi: sd_doc.dvi
  66.     dviselect -i sd_doc.dvi =1:2 > tempa.dvi
  67.     dviselect -i sd_doc.dvi :_1 > tempb.dvi
  68.     (dviselect -i sd_doc.dvi -s 1: | dviselect =3:) > tempc.dvi
  69.     dviconcat -o sd_doc-sorted.dvi tempa.dvi tempb.dvi tempc.dvi
  70.     rm -f tempa.dvi tempb.dvi tempc.dvi
  71.  
  72. sd_doc.PS: sd_doc-sorted.dvi
  73.     dvips -U -o sd_doc.PS sd_doc-sorted.dvi
  74.  
  75.  
  76. sdui-x11.o: sdui-x11.c
  77.     $(CC) $(CFLAGS) $(UICFLAGS) -c sdui-x11.c
  78.  
  79. mkcalls.o sdsi.o: paths.h
  80.  
  81. mkcalls.o sdmove.o sdbasic.o sd16.o: database.h
  82.  
  83. $(SD_OBJS): sd.h database.h
  84.  
  85.  
  86. clean::
  87.     rm -f *~ core *.o sd mkcalls sd_calls.dat sd.tar
  88.  
  89. lint:
  90.     /usr/lang/alint -ux $(SD_SRCS) $(SDUI_SRC)
  91.  
  92. DISTFILES = README Relnotes relnotes.archive Imakefile Makefile Sd.ad \
  93.             sd_calls.txt COPYING database.doc sd_doc.txi
  94. DISTSRCS = sd.h database.h paths.h mkcalls.c
  95.  
  96. distrib:
  97.     tar cvf sd.tar $(DISTFILES) $(SD_SRCS) $(SDUI_SRC) $(DISTSRCS)
  98.